﻿using LitJson;
using System.Collections.Generic;

namespace CGF
{
    public class I18NConfig
    {
        public class PrefabConfig
        {
            public List<List<string>> indexContents = new List<List<string>>();
            public List<string> keys = new List<string>();
            public List<List<string>> keyContents = new List<List<string>>();
        }

        public Dictionary<string, PrefabConfig> prefabConfigs = new Dictionary<string, PrefabConfig>();

        public string ToJson()
        {
            return JsonMapper.ToJson(this);
        }

        public static I18NConfig Parse(string json)
        {
            return JsonMapper.ToObject<I18NConfig>(json);
        }
    }
}